import { isIE } from '@/utils/utils';
import { dynamic } from 'umi';

export default dynamic({
  async loader() {
    if (isIE()) {
      const st1 = '温馨提示';
      const st2 = '尊敬的用户';
      const st3 = '请使用最新版chrome';
      const st4 = '360等现代浏览器打开本页';
      const warning = `${tr(st1)}：${tr(st2)}，${tr(st3)}、edge、${tr(st4)}`;
      alert(warning);
      return;
    }
    const { default: ClassicEditor } = await import(/* webpackChunkName: "external_form_ckeditor" */ './CKEditor.tsx');
    return ClassicEditor;
  },
});
